package d1;

public class Test {
    public static void eat(Animal animal){
        animal.eat();
    }
    public static void main(String[] args){
        Animal cat = new Cat("猫",2);
        Dog dog = new Dog("狗",1);
        eat(cat);
        eat(dog);
    }
}
